<template>
	<view class="zone">
		<u-navbar :is-back="false" :height="60"  :border-bottom="false">
			<view class="slot-wrap">
				<view class="nav-bar">
					<u-icon class="back" color="#131314" size="20px" @click="$p.back()" name="arrow-left"></u-icon>
					<text>装备奖励</text>
					<text class="r_title"  @click="huishou">回收客服</text>
				</view>
			</view>
		</u-navbar>

		<view class="main">
			<p class="textcen">客服上班时间 8:30~22:00  <br>
打到对应装备后联系客服奖励大量银元！</p>
			<!-- tab部分 -->
			<view class="tab">
				<view v-for="(item,index) in tablist" :key="index" :class="[stat == item.id?'active':'']"
					@click="tabchange(item.id)">{{item.name}}</view>
			</view>

			<view>
				<view class="otbox" v-if="stat == 1">
					<view class="area">
						<text>时间：开区1～10天</text>
						<text>奖励区服：搬砖467区-搬砖500区</text>
						<text>具体根据公告时间来安排</text>
					

						<view class="posabtn button" @click="$p.navto('/pages/home/Introduction')">快速搬砖教程</view>
					</view>

					<view class="item" v-for="(item,index) in eqlist1.one" :key="index">
						<view>{{item.name}}</view>
						<view>
							<text>{{item.gold}}</text>
						</view>
					</view>
				</view>

				<view class="otbox" v-if=" stat == 2">
					<view class="area">
						<text>时间：开区11-20天</text>
						<text>奖励区服：搬砖462区-搬砖466区</text>
						<text>具体根据公告时间来安排</text>
						<view class="posabtn button" @click="$p.navto('/pages/home/Introduction')">快速搬砖教程</view>
					</view>
					<view class="item" v-for="(item,index) in eqlist1.tow" :key="index">
						<view>{{item.name}}</view>
						<view>{{item.gold}}</view>
					</view>
				</view>

				<view class="otbox" v-if="stat == 3">
					<view class="area">
						<text>时间：永久回收</text>
						<text>奖励区服：搬砖137-搬砖461区</text>
						<text>具体根据公告时间来安排</text>
						<view class="posabtn button" @click="$p.navto('/pages/home/Introduction')">快速搬砖教程</view>
					</view>
					<view class="item" v-for="(item,index) in eqlist1.three" :key="index">
						<view>{{item.name}}</view>
						<view>
							<text>{{item.gold}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				tablist: [{
						id: 1,
						name: '新区奖励'
					},
					{
						id: 2,
						name: '老区奖励'
					},
					{
						id: 3,
						name: '统战区奖励'
					},
				],
				stat: 1,
				eqlist1: '',
				eqlist2: '',
				eqlist3: '',
				qqgroup: '',
				newarea: '暂定',
				old: '暂定',
				tongzhan: '暂定',
				qqlink: '',
			};
		},
		onLoad(){
			this.getequip();
		},
		methods: {
			// 获取装备列表
			async getequip() {
				let res = await this.$http.index.equip()
				this.eqlist1 = res.game1
				this.qqgroup = res.qqgroup
				this.qqlink = res.qqlink
			},	

			tabchange(id) {
				this.stat = id
			},

			huishou(){
				this.$p.navto('/pages/my/service_kf?id=2')
			},
		},
	}
</script>

<style lang="less">
	.zone {
		background: url('http://img.cpgm.cc/panda/static/home/bg3.jpg') no-repeat;
		background-size: 100% auto;
		background-attachment: fixed;
		min-height: 100vh;
	}

	.main {
		padding: 10px 10px;
	}

	.nav-bar {
		background: url('http://img.cpgm.cc/panda/static/home/bg3.jpg') no-repeat;
		background-size: 100% auto;
	}

.r_title {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #000000 !important;
	font-size: 12px !important;
}


// tab导航
	.tab {
		width: 100%;
		display: flex;
		align-items: center;
		background: rgba(255,255,255,0.7);
		box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.1);
		border-radius: 5px;
		padding: 5px;
		overflow: hidden;
		margin: 10px auto;
		border-radius: 7px;
		// backdrop-filter: blur(50px);

		view {
			width: 50%;
			height: 42px;
			text-align: center;
			line-height: 42px;
			color: #343434;
			font-size: 13px;
			font-weight: 600;
			border-radius: 7px;
		}
	}

	.active {
		color: #FFFFFF !important;
		background: #000000 !important;
	}


	
	.otbox {
		margin-top: 10px;
	}

	.area {
		position: relative;
		background: #FFFFFF;
		border-radius: 7px;
		padding: 10px;
		display: flex;
		flex-direction: column;

		text:nth-child(1) {
			color: #000000;
			font-size: 14px;
		}

		text:nth-child(2),
		text:nth-child(3) {
			color: #696969;
			font-size: 12px;
		}

		text:nth-child(2) {
			margin: 5px 0;
		}
	}

	.item {
		padding: 16px;
		background: rgba(255,255,255,0.9);
		border-radius: 7px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 5px 0;
	}

	.textcen {
		text-align: center;
	}


	.posabtn {
		position: absolute;
		right: 10px;
		top: calc(50% - 17.5px);
		width: 90px;
		height: 35px;
		background: linear-gradient(180deg, #FFF8B5 0%, #FFFFEB 100%);
		box-shadow: 0px 2px 0px 0px rgba(150,70,3,1), inset 0px -2px 0px 0px rgba(225,186,101,1);
		border-radius: 5px;
		border: 1px solid #964603;
		color: #964603;
		font-weight: 600;
		font-size: 12px;
	}


</style>
